﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace lifeofbob
{
    public class Rock : Projectile
    {
        static Point size = new Point(10, 10);
        static Point halfSize = new Point(5, 5);
        static Texture2D texture = TextureLibrary.stone;
        private float angle;

        public Rock(Vector2 pos, Vector2 speed) : base(new Vector2(pos.X - halfSize.X, pos.Y - halfSize.Y), size, speed, texture)
        {
            Random rand = new Random();
            angle = rand.Next(-1, 1);
        }

        public override void Draw(SpriteBatch sb)
        {
            sb.Draw(texture, rectangle, null, Color.White, angle, new Vector2(0, 0), SpriteEffects.None, 0);
        }
    }
}
